Skip to content

Adds Iterator.prototype.[chunks,includes,join,windows] - #255

Open
mhassan1 wants to merge 7 commits into
mainfrom
iterator-more
Open

mhassan1 wants to merge 7 commits into
mainfrom
iterator-more

Conversation

@mhassan1

@mhassan1 mhassan1 commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator

This PR adds the following ES2027 polyfills:

  • Iterator.prototype.chunks
  • Iterator.prototype.includes
  • Iterator.prototype.join
  • Iterator.prototype.windows

@mhassan1
mhassan1 requested a review from romainmenke November 3, 2026 15:35

@romainmenke romainmenke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this 🎉


  • return CreateIterResultObject(array, false) for yields, and set this["[[Done]]"] = true before returning the final partial chunk/window.
  • RangeError for the two includes cases.
  • return(): early-return if [[Done]]; set [[Done]] = true before IteratorClose.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants